//var store modeViewMatrix
uniform highp mat4 u_ModelViewMatrix;
//var store modeViewMatrix
uniform highp mat4 u_ProjectionMatrix;
//var store cpu vertet info
attribute vec4 a_Position;
//var store cpu color info
attribute vec4 a_Color;
//var store cpu TexCoord
attribute vec2 a_TexCoord;
//var store cpu normal
attribute vec3 a_Normal;

//var in vertex transfor color info from cpu to fragment shader
varying lowp vec4 frag_Color;
//var store texture coord for fragment shader
varying lowp vec2 frag_TexCoord;
//var store normal for fragment shader
varying lowp vec3 frag_Normal;
//var store eye position for fragment shader
varying lowp vec3 frag_Position;

void main(void) {
    //set cup color to vertex var
    frag_Color = a_Color;
    gl_Position = u_ProjectionMatrix * u_ModelViewMatrix * a_Position;
    //set cpu TexCoord to fragement
    frag_TexCoord = a_TexCoord;
    frag_Normal = (u_ModelViewMatrix * vec4(a_Normal, 0.0)).xyz;
    frag_Position = (u_ModelViewMatrix * a_Position).xyz;
}

